import paramiko

client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(hostname='12.18.0.16', port='22', username='oracle', password='oracle')
disk = "/home/oracle/dbmonitor/ora -u dbmonitor/ghsdbmon1tor@12.17.13.10:1521/wms_adg dbinfo"
stdin, stdout, stderr = client.exec_command(disk)
##命令执行结果,readlines是将结果弄成列表方式
disk_res = stdout.readlines()
disk_res2 = stdout.read()
print(disk_res,disk_res2)
